<style type="text/css">
    .tablelist td{line-height:26px;}
    .tablelist tbody tr.odd {background:#E3F0FA}
</style>
<form class="form-inline" method="get">
    <div class="form-group col-xs-2">
        <div class="col-xs-12">
            <input class="form-control" name="realname" value="{$realname}"
                   placeholder="用户名或真实姓名">
        </div>
    </div>

	 <div class="form-group col-xs-2">
        <div class="col-xs-12">
            <select class="form-control" name="state" id="state">
                <option value="">全部状态</option>
                <option value="1" {if isset($param.state) && $param.state eq 1}selected{/if}>未发放</option>
                <option value="2" {if isset($param.state) && $param.state eq 2}selected{/if}>已发放</option>
            </select>
        </div>
    </div>

    <div class="form-group col-xs-2">
        <div class="col-xs-12">
            <input class="form-control" name="shopid" value="{$shopid}"
                   placeholder="矿机编号">
        </div>
    </div>

    <div class="form-group col-xs-2">
        <div class="col-xs-12">
            <button type="submit" class="btn btn-success">
                确认搜索
            </button>
        </div>
    </div>
	<p class="label label-danger">该列表每个矿机的每天收益，会员看不到，只有管理员能看到。</p>
</form>
<hr>
<table class="table table-striped">
    <thead>
    <tr>
        <td>编号</td>
        <td>用户信息</td>
		<td>矿机名称</td>

        <td>自动发放时间</td>
        <td>发放状态</td>
        <td>需发放SCB</td>
    </tr>
    </thead>
    <tbody>
    {volist name="list" id="item"}
    <tr>
        <td>{$item.id}</td>
        <td>
            <p>用户名:{$item.uid|get_uname}</p>
            <p>真实名:{$item.uid|get_realname}</p>
        </td>
        <td>
            <p>
                矿机编号:{$item.shopid}
                <a style='color:#d9534f' href="{:url('Bot/shoplist')}?id={$item.shopid}">查看</a>
            </p>
            <p>矿机名称:{$item.title}</p>
        </td>

        <td>
            {$item.sendtime|date='Y-m-d',###}
        </td>
        <td>
            {if condition="$item['state'] eq 1"}
				<p><label class="label label-danger">未到发放时间</label></p>
                <p>
                    <a style='color:white;' class="label label-success" href="javascript:;" data-toggle="confirm" data-title="确定要发放？(不能恢复哦！！)" data-url="{:url('SCB/sendone', ['id'=>$item.id])}" style='color:#d9534f'>
                    强制发放</a></p>
			{/if}
            {if condition="$item['state'] eq 2"}
				<p><label class="label label-success">已发放</label></p>
                <p>{$item.edittime|date='m/d H:i',###}发放</p>    
			{/if}
        </td>
        <td>{$item.dayearn} SCB</td>

    </tr>
    {/volist}
    </tbody>
</table>

<div class="row">
    <div class="col-xs-12" style="text-align: right;">
        {$page}
    </div>
</div>
<script src="__PUBLIC__/vendors/select2/js/select2.min.js"></script>
<script type="text/javascript">
    $('.tablelist tbody tr:odd').addClass('odd');
</script>
